<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<!--左侧导航开始-->
<nav class="navbar-default navbar-static-side" role="navigation">
    <div class="nav-close"><i class="fa fa-times-circle"></i>
    </div>
    <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
            <li class="nav-header">
                <div class="dropdown profile-element" align="left">
                    <%--<span><img alt="image" class="img-circle" src="static/img/profile_small.jpg" /></span>--%>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold">${user.userName}</strong></span>
                                <span class="text-muted text-xs block">${user.nickName}<b class="caret"></b></span>
                                </span>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs" >
                        <!-- <li><a class="J_menuItem" href="user/goEditUserBySelf">个人资料</a>
                        </li>
                        <li class="divider"></li> -->
                        <li><a href="user/login">安全退出</a>
                        </li>
                    </ul>
                </div>
                <div class="logo-element">${user.nickName}
                </div>
            </li>
            <!-- <li>
                <a class="J_menuItem" href="app/dashboard" data-index="0"> <i class="fa fa-home"></i>
                    <span class="nav-label">首页</span></a>
            </li> -->
            <c:forEach items="${menuList}" var="menu1">
                <c:if test="${'0' == menu1.menuStatus && menu1.hasMenu}">
                    <li>
                        <a <c:if test="${0 == menu1.menuRedirect}">class="J_menuItem"</c:if> <c:if test="${not empty menu1.menuUrl && '#' != menu1.menuUrl}">href="${menu1.menuUrl}"</c:if><c:if test="${0 != menu1.menuRedirect}">target="_blank"</c:if> >
                            <i class="${menu1.menuIcon == null ? 'menu-icon fa fa-leaf black' : menu1.menuIcon}"></i>
							<span class="menu-text">
                                    ${menu1.menuName }
                            </span>
                            <c:if test="${'[]' != menu1.subMenu}"><span class="fa  fa-angle-right arrow"></span></c:if>
                        </a>
                        <c:if test="${'[]' != menu1.subMenu}">
                            <ul class="nav nav-second-level">
                                <c:forEach items="${menu1.subMenu}" var="menu2">
                                    <c:if test="${'0' == menu2.menuStatus && menu2.hasMenu}">
                                        <li class="" id="${menu2.id }">
                                            <a  <c:if test="${0 == menu2.menuRedirect}">class="J_menuItem"</c:if> <c:if test="${not empty menu2.menuUrl && '#' != menu2.menuUrl}">href="${menu2.menuUrl}"</c:if><c:if test="${0 != menu2.menuRedirect}">target="_blank"</c:if> >
                                                <i class="${menu2.menuIcon == null ? 'menu-icon fa fa-leaf black' : menu2.menuIcon}"></i>
                                                    ${menu2.menuName }
                                                <c:if test="${'[]' != menu2.subMenu}"><span class="fa arrow"></span></c:if>
                                            </a>
                                      <%--       <c:if test="${'[]' != menu2.subMenu}">
                                                <ul class="nav nav-second-level">
                                                    <c:forEach items="${menu2.subMenu}" var="menu3">
                                                        <c:if test="${menu3.hasMenu && '0' == menu3.menuStatus}">
                                                            <li class="" id="m${menu3.menuId }">
                                                                <a class="J_menuItem" <c:if test="${not empty menu3.menuUrl && '#' != menu3.menuUrl}">href="${menu3.menuUrl}"</c:if> >
                                                                    <i class="${menu3.menuIcon == null ? 'menu-icon fa fa-leaf black' : menu3.menuIcon}"></i>
                                                                        ${menu3.menuName }
                                                                    <c:if test="${'[]' != menu3.subMenu}"><span class="fa arrow"></span></c:if>
                                                                </a>
                                                                <c:if test="${'[]' != menu3.subMenu}">
                                                                    <ul class="nav nav-second-level">
                                                                        <c:forEach items="${menu3.subMenu}" var="menu4">
                                                                            <c:if test="${menu4.hasMenu && '0' == menu4.menuStatus}">
                                                                                <li class="" id="n${menu4.menuId }">
                                                                                    <c:if test="${'[]' != menu4.subMenu}">
                                                                                        <a class="J_menuItem" <c:if test="${not empty menu4.menuUrl && '#' != menu4.menuUrl}">href="${menu4.menuUrl}"</c:if> >
                                                                                        </c:if>
                                                                                        <c:if test="${'[]' == menu4.subMenu}">
                                                                                            <a class="J_menuItem" <c:if test="${not empty menu4.menuUrl && '#' != menu4.menuUrl}">href="${menu4.menuUrl}"</c:if> >
                                                                                            </c:if>
                                                                                            <i class="${menu4.menuIcon == null ? 'menu-icon fa fa-leaf black' : menu4.menuIcon}"></i>
                                                                                                ${menu4.menuName }
                                                                                        </a>
                                                                                </li>
                                                                            </c:if>
                                                                        </c:forEach>
                                                                    </ul>
                                                                </c:if>
                                                            </li>
                                                        </c:if>
                                                    </c:forEach>
                                                </ul>
                                            </c:if> --%>
                                        </li>
                                    </c:if>
                                </c:forEach>
                            </ul>
                        </c:if>
                    </li>
                </c:if>
            </c:forEach>
        <%--     <c:forEach items="${menuList}" var="menu1">
                <c:if test="${!menu1.hasMenu && '0' == menu1.menuStatus}">
                <ul>
                    <li>
                        <a>
                            <i class="${menu1.menuIcon == null ? 'menu-icon fa fa-leaf black' : menu1.menuIcon}"></i>
                            <span class="nav-label">${menu1.menuName }</span>
                            <span class="fa arrow"></span>
                        </a>
                        <c:if test="${'[]' != menu1.subMenu}">
                            <ul class="nav nav-second-level">
                                <c:forEach items="${menu1.subMenu}" var="menu2">

                                </c:forEach>
                            </ul>
                        </c:if>
                    </li>
                </ul>
                </c:if>
                <c:if test="${!menu1.hasMenu && '0' == menu1.menuStatus}">
                    <li>
                        <a class="J_menuItem" href="${menu1.menuUrl}">Morris.js</a>
                    </li>
                </c:if>
            </c:forEach> --%>
        </ul>
    </div>
</nav>
<!--左侧导航结束-->
